# -*- coding: utf-8 -*-
"""
Python代码示例
"""
import demo.cdn.common as common
import time

# 获取WAF分析数据
#
# 不推荐使用，可使用单域名计数曲线型接口(v31/yjs/analytics/multicount)
# https://su.baidu.com/help/index.html#/7_kaifazhinan/2_APIcankao-NEW/7_baobiaoxiangguan/7.6_huoquWAFfenxishuju.md
def analytics_waf():
    """
    示例
    """
    path = "v31/yjs/analytics/waf"
    params = {}
    params['domain'] = common.domain
    params['nums'] = 2
    params['type'] = 'stat'

    payload = {}

    headers = common.get_request_header(path, params, payload)

    url = common.OPENAPI_BASE_URL % path

    response = common.send_http_request("GET", url, params=params, payload=payload, headers=headers)


if __name__ == '__main__':
    analytics_waf()